package com.hongyan.base;

import com.hongyan.main.SwingMainFrame;
import org.jdesktop.swingx.JXDatePicker;

import javax.swing.*;

public abstract class BaseJpanel extends JPanel {
    public SwingMainFrame getSwingMainFrame() {
        return swingMainFrame;
    }

    private SwingMainFrame swingMainFrame;


    public BaseJpanel(SwingMainFrame swingMainFrame) {
        initComponents();
        this.swingMainFrame = swingMainFrame;
        setBounds(0, 0, getJpanelWidth(), getJpanelHeight());

        initListen();
    }

    public abstract void initComponents();
    public abstract void initData();
    public abstract void initListen();

    public abstract int getJpanelHeight();

    public abstract int getJpanelWidth();

    public abstract String title();
}
